home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc™ Source Code / Messaging / OSL / HshTbTyp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-28  |  2.3 KB  |  87 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        HshTbTyp.h
  3.  
  4.     Contains:    Types for AEM's hash table functions
  5.  
  6.     Owned by:    Eric House
  7.  
  8.     Copyright:    © 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <4>     4/24/95    eeh        1212343: (forgot to remove the 5 $s in the
  13.                                     comment)
  14.          <3>     4/24/95    eeh        1212343: remove ODTypes.h
  15.          <2>    10/28/94    SS        #1196346 - missing includes
  16.          <1>     8/11/94    eeh        first checked in
  17.  
  18.     To Do:
  19. */
  20.  
  21. #ifndef _HSHTBTYP_
  22. #define _HSHTBTYP_
  23.  
  24. #ifndef __TYPES__
  25. #include "Types.h"
  26. #endif
  27.  
  28. //==============================================================================
  29. // Scalar Types
  30. //==============================================================================
  31.  
  32. typedef    void* KeyPtr;
  33. typedef    void* HEntryPtr;
  34. typedef KeyPtr ODKeyPtr;
  35.  
  36. typedef    Handle HashTable;
  37. typedef Handle HHand ; 
  38. //typedef  ProcPtr     HashProc  ;        LibraryManager.h doesn't like this
  39. struct _MemProcBlock {
  40.     ProcPtr                     DerefProc ;
  41.     ProcPtr                     NewProc ;
  42.     ProcPtr                     GrowProc ;
  43.     ProcPtr                     DisposeProc ;
  44.     }  ;
  45. typedef struct _MemProcBlock MemProcBlock, *OSLMemProcs;
  46.  
  47.  
  48. //==============================================================================
  49. // Functions
  50. //==============================================================================
  51.  
  52. #ifdef __cplusplus
  53. extern "C" {
  54. #endif
  55.  
  56. extern pascal OSErr AENewHashTable(long NumEntries, short KeySize,
  57.         short ValueSize, MemProcBlock* MemHooks, Boolean SysHeap,
  58.         HashTable* Table)
  59. THREEWORDINLINE(0x303C, 0x092E, 0xA816);
  60.  
  61. extern pascal OSErr AEDisposeHashTable(HashTable* Table, MemProcBlock* MemHooks)
  62. THREEWORDINLINE(0x303C, 0x042F, 0xA816);
  63.  
  64. extern pascal OSErr AEAddKeyEntry(HHand Table, MemProcBlock* MemHooks, KeyPtr Key,
  65.         HEntryPtr Value)
  66. THREEWORDINLINE(0x303C, 0x0830, 0xA816);
  67.  
  68. extern pascal OSErr AEReplaceEntry(HashTable Table, MemProcBlock* MemHooks, KeyPtr Key,
  69.                             HEntryPtr Value)
  70. THREEWORDINLINE(0x303C, 0x0831, 0xA816);
  71.  
  72. extern pascal OSErr AERemoveKeyEntry(HashTable Table, MemProcBlock* MemHooks, KeyPtr Key)
  73. THREEWORDINLINE(0x303C, 0x0632, 0xA816);
  74.  
  75. extern pascal OSErr AEGetKeyValue(HashTable Table, MemProcBlock* MemHooks, KeyPtr Key,
  76.                             HEntryPtr Value)
  77. THREEWORDINLINE(0x303C, 0x0833, 0xA816);
  78.  
  79. extern pascal OSErr AEGetIndexedEntry(HashTable Table, MemProcBlock* MemHooks, long index,
  80.                                 KeyPtr Key, HEntryPtr Value)
  81. THREEWORDINLINE(0x303C, 0x0A34, 0xA816);
  82.  
  83. #ifdef __cplusplus
  84. }
  85. #endif
  86.  
  87. #endif